package it.lupo.model;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.validator.constraints.URL;

@Entity
@Table(name="lupo.types")
public class Type extends BaseEntity<String>{

	private static final long serialVersionUID = 1L;
	
	@Column
	private String description;
	
	@OneToMany(mappedBy="type",fetch=FetchType.LAZY)
	private List<Conferment> conferment;
	
	@Column
	@URL
	private String url;
	
	public Type(){}
	
	public Type(String t)
	{
		super(t);
	}

	
	public Type(String type,String description, String url) {
		super(type);
		this.description = description;
		this.url = url;
	}

	public String getDescription() {
		return description;
	}

	public void getDescription(String description) {
		this.description = description;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	
	

	
}
